<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>菜单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/global.css">
    <style>
        .layui-treeSelect-body{
            max-height: 230px;
        }

        .layui-form-select dl{
            max-height: 230px;
        }

    </style>
</head>
<body>

<div class="edit-form layui-form" lay-filter="layuiadmin-form-menuadmin" id="layuiadmin-form-menuadmin"
     style="padding: 20px 0 0 0;">

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-inline">
            <input th:value="${menu.name}" type="text" name="name" lay-verify="required" placeholder="请输入名称"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">权限</label>
        <div class="layui-input-inline">
            <input type="text" id="tree" lay-filter="tree" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-inline">
            <select name="icon" lay-search lay-verify="required" th:value="${menu.icon}">
                <option value="layui-icon-transfer" layui-icon="layui-icon-transfer" th:selected="${menu.icon}=='layui-icon-transfer'">transfer</option>
                <option value="layui-icon-theme" layui-icon="layui-icon-theme" th:selected="${menu.icon}=='layui-icon-theme'">theme</option>
                <option value="layui-icon-slider" layui-icon="layui-icon-slider" th:selected="${menu.icon}=='layui-icon-slider'">slider</option>
                <option value="layui-icon-face-smile" layui-icon="layui-icon-face-smile" th:selected="${menu.icon}=='layui-icon-face-smile'">face-smile</option>
                <option value="layui-icon-heart-fill" layui-icon="layui-icon-heart-fill" th:selected="${menu.icon}=='layui-icon-heart-fill'">heart-fill</option>
                <option value="layui-icon-heart" layui-icon="layui-icon-heart" th:selected="${menu.icon}=='layui-icon-heart'">heart</option>
                <option value="layui-icon-light" layui-icon="layui-icon-light" th:selected="${menu.icon}=='layui-icon-light'">light</option>
                <option value="layui-icon-time" layui-icon="layui-icon-time" th:selected="${menu.icon}=='layui-icon-time'">time</option>
                <option value="layui-icon-bluetooth" layui-icon="layui-icon-bluetooth" th:selected="${menu.icon}=='layui-icon-bluetooth'">bluetooth</option>
                <option value="layui-icon-at" layui-icon="layui-icon-at" th:selected="${menu.icon}=='layui-icon-at'">at</option>
                <option value="layui-icon-mute" layui-icon="layui-icon-mute" th:selected="${menu.icon}=='layui-icon-mute'">mute</option>
                <option value="layui-icon-mike" layui-icon="layui-icon-mike" th:selected="${menu.icon}=='layui-icon-mike'">mike</option>
                <option value="layui-icon-key" layui-icon="layui-icon-key" th:selected="${menu.icon}=='layui-icon-key'">key</option>
                <option value="layui-icon-gift" layui-icon="layui-icon-gift" th:selected="${menu.icon}=='layui-icon-gift'">gift</option>
                <option value="layui-icon-email" layui-icon="layui-icon-email" th:selected="${menu.icon}=='layui-icon-email'">email</option>
                <option value="layui-icon-rss" layui-icon="layui-icon-rss" th:selected="${menu.icon}=='layui-icon-rss'">rss</option>
                <option value="layui-icon-wifi" layui-icon="layui-icon-wifi" th:selected="${menu.icon}=='layui-icon-wifi'">wifi</option>
                <option value="layui-icon-logout" layui-icon="layui-icon-logout" th:selected="${menu.icon}=='layui-icon-logout'">logout</option>
                <option value="layui-icon-android" layui-icon="layui-icon-android" th:selected="${menu.icon}=='layui-icon-android'">android</option>
                <option value="layui-icon-ios" layui-icon="layui-icon-ios" th:selected="${menu.icon}=='layui-icon-ios'">ios</option>
                <option value="layui-icon-windows" layui-icon="layui-icon-windows" th:selected="${menu.icon}=='layui-icon-windows'">windows</option>
                <option value="layui-icon-transfer" layui-icon="layui-icon-transfer" th:selected="${menu.icon}=='layui-icon-transfer'">transfer</option>
                <option value="layui-icon-service" layui-icon="layui-icon-service" th:selected="${menu.icon}=='layui-icon-service'">service</option>
                <option value="layui-icon-subtraction" layui-icon="layui-icon-subtraction" th:selected="${menu.icon}=='layui-icon-subtraction'">subtraction</option>
                <option value="layui-icon-addition" layui-icon="layui-icon-addition" th:selected="${menu.icon}=='layui-icon-addition'">addition</option>
                <option value="layui-icon-slider" layui-icon="layui-icon-slider" th:selected="${menu.icon}=='layui-icon-slider'">slider</option>
                <option value="layui-icon-print" layui-icon="layui-icon-print" th:selected="${menu.icon}=='layui-icon-print'">print</option>
                <option value="layui-icon-export" layui-icon="layui-icon-export" th:selected="${menu.icon}=='layui-icon-export'">export</option>
                <option value="layui-icon-cols" layui-icon="layui-icon-cols" th:selected="${menu.icon}=='layui-icon-cols'">cols</option>
                <option value="layui-icon-screen-restore" layui-icon="layui-icon-screen-restore" th:selected="${menu.icon}=='layui-icon-screen-restore'">screen-restore</option>
                <option value="layui-icon-screen-full" layui-icon="layui-icon-screen-full" th:selected="${menu.icon}=='layui-icon-screen-full'">screen-full</option>
                <option value="layui-icon-rate-half" layui-icon="layui-icon-rate-half" th:selected="${menu.icon}=='layui-icon-rate-half'">rate-half</option>
                <option value="layui-icon-rate" layui-icon="layui-icon-rate" th:selected="${menu.icon}=='layui-icon-rate'">rate</option>
                <option value="layui-icon-rate-solid" layui-icon="layui-icon-rate-solid" th:selected="${menu.icon}=='layui-icon-rate-solid'">rate-solid</option>
                <option value="layui-icon-cellphone" layui-icon="layui-icon-cellphone" th:selected="${menu.icon}=='layui-icon-cellphone'">cellphone</option>
                <option value="layui-icon-vercode" layui-icon="layui-icon-vercode" th:selected="${menu.icon}=='layui-icon-vercode'">vercode</option>
                <option value="layui-icon-login-wechat" layui-icon="layui-icon-login-wechat" th:selected="${menu.icon}=='layui-icon-login-wechat'">login-wechat</option>
                <option value="layui-icon-login-qq" layui-icon="layui-icon-login-qq" th:selected="${menu.icon}=='layui-icon-login-qq'">login-qq</option>
                <option value="layui-icon-login-weibo" layui-icon="layui-icon-login-weibo" th:selected="${menu.icon}=='layui-icon-login-weibo'">login-weibo</option>
                <option value="layui-icon-password" layui-icon="layui-icon-password" th:selected="${menu.icon}=='layui-icon-password'">password</option>
                <option value="layui-icon-username" layui-icon="layui-icon-username" th:selected="${menu.icon}=='layui-icon-username'">username</option>
                <option value="layui-icon-refresh-3" layui-icon="layui-icon-refresh-3" th:selected="${menu.icon}=='layui-icon-refresh-3'">refresh-3</option>
                <option value="layui-icon-auz" layui-icon="layui-icon-auz" th:selected="${menu.icon}=='layui-icon-auz'">auz</option>
                <option value="layui-icon-spread-left" layui-icon="layui-icon-spread-left" th:selected="${menu.icon}=='layui-icon-spread-left'">spread-left</option>
                <option value="layui-icon-shrink-right" layui-icon="layui-icon-shrink-right" th:selected="${menu.icon}=='layui-icon-shrink-right'">shrink-right</option>
                <option value="layui-icon-snowflake" layui-icon="layui-icon-snowflake" th:selected="${menu.icon}=='layui-icon-snowflake'">snowflake</option>
                <option value="layui-icon-tips" layui-icon="layui-icon-tips" th:selected="${menu.icon}=='layui-icon-tips'">tips</option>
                <option value="layui-icon-note" layui-icon="layui-icon-note" th:selected="${menu.icon}=='layui-icon-note'">note</option>
                <option value="layui-icon-home" layui-icon="layui-icon-home" th:selected="${menu.icon}=='layui-icon-home'">home</option>
                <option value="layui-icon-senior" layui-icon="layui-icon-senior" th:selected="${menu.icon}=='layui-icon-senior'">senior</option>
                <option value="layui-icon-refresh" layui-icon="layui-icon-refresh" th:selected="${menu.icon}=='layui-icon-refresh'">refresh</option>
                <option value="layui-icon-refresh-1" layui-icon="layui-icon-refresh-1" th:selected="${menu.icon}=='layui-icon-refresh-1'">refresh-1</option>
                <option value="layui-icon-flag" layui-icon="layui-icon-flag" th:selected="${menu.icon}=='layui-icon-flag'">flag</option>
                <option value="layui-icon-theme" layui-icon="layui-icon-theme" th:selected="${menu.icon}=='layui-icon-theme'">theme</option>
                <option value="layui-icon-notice" layui-icon="layui-icon-notice" th:selected="${menu.icon}=='layui-icon-notice'">notice</option>
                <option value="layui-icon-website" layui-icon="layui-icon-website" th:selected="${menu.icon}=='layui-icon-website'">website</option>
                <option value="layui-icon-console" layui-icon="layui-icon-console" th:selected="${menu.icon}=='layui-icon-console'">console</option>
                <option value="layui-icon-face-surprised" layui-icon="layui-icon-face-surprised" th:selected="${menu.icon}=='layui-icon-face-surprised'">face-surprised</option>
                <option value="layui-icon-set" layui-icon="layui-icon-set" th:selected="${menu.icon}=='layui-icon-set'">set</option>
                <option value="layui-icon-template-1" layui-icon="layui-icon-template-1" th:selected="${menu.icon}=='layui-icon-template-1'">template-1</option>
                <option value="layui-icon-app" layui-icon="layui-icon-app" th:selected="${menu.icon}=='layui-icon-app'">app</option>
                <option value="layui-icon-template" layui-icon="layui-icon-template" th:selected="${menu.icon}=='layui-icon-template'">template</option>
                <option value="layui-icon-praise" layui-icon="layui-icon-praise" th:selected="${menu.icon}=='layui-icon-praise'">praise</option>
                <option value="layui-icon-tread" layui-icon="layui-icon-tread" th:selected="${menu.icon}=='layui-icon-tread'">tread</option>
                <option value="layui-icon-male" layui-icon="layui-icon-male" th:selected="${menu.icon}=='layui-icon-male'">male</option>
                <option value="layui-icon-female" layui-icon="layui-icon-female" th:selected="${menu.icon}=='layui-icon-female'">female</option>
                <option value="layui-icon-camera" layui-icon="layui-icon-camera" th:selected="${menu.icon}=='layui-icon-camera'">camera</option>
                <option value="layui-icon-camera-fill" layui-icon="layui-icon-camera-fill" th:selected="${menu.icon}=='layui-icon-camera-fill'">camera-fill</option>
                <option value="layui-icon-more" layui-icon="layui-icon-more" th:selected="${menu.icon}=='layui-icon-more'">more</option>
                <option value="layui-icon-more-vertical" layui-icon="layui-icon-more-vertical" th:selected="${menu.icon}=='layui-icon-more-vertical'">more-vertical</option>
                <option value="layui-icon-rmb" layui-icon="layui-icon-rmb" th:selected="${menu.icon}=='layui-icon-rmb'">rmb</option>
                <option value="layui-icon-dollar" layui-icon="layui-icon-dollar" th:selected="${menu.icon}=='layui-icon-dollar'">dollar</option>
                <option value="layui-icon-diamond" layui-icon="layui-icon-diamond" th:selected="${menu.icon}=='layui-icon-diamond'">diamond</option>
                <option value="layui-icon-fire" layui-icon="layui-icon-fire" th:selected="${menu.icon}=='layui-icon-fire'">fire</option>
                <option value="layui-icon-return" layui-icon="layui-icon-return" th:selected="${menu.icon}=='layui-icon-return'">return</option>
                <option value="layui-icon-location" layui-icon="layui-icon-location" th:selected="${menu.icon}=='layui-icon-location'">location</option>
                <option value="layui-icon-read" layui-icon="layui-icon-read" th:selected="${menu.icon}=='layui-icon-read'">read</option>
                <option value="layui-icon-survey" layui-icon="layui-icon-survey" th:selected="${menu.icon}=='layui-icon-survey'">survey</option>
                <option value="layui-icon-face-smile" layui-icon="layui-icon-face-smile" th:selected="${menu.icon}=='layui-icon-face-smile'">face-smile</option>
                <option value="layui-icon-face-cry" layui-icon="layui-icon-face-cry" th:selected="${menu.icon}=='layui-icon-face-cry'">face-cry</option>
                <option value="layui-icon-cart-simple" layui-icon="layui-icon-cart-simple" th:selected="${menu.icon}=='layui-icon-cart-simple'">cart-simple</option>
                <option value="layui-icon-cart" layui-icon="layui-icon-cart" th:selected="${menu.icon}=='layui-icon-cart'">cart</option>
                <option value="layui-icon-next" layui-icon="layui-icon-next" th:selected="${menu.icon}=='layui-icon-next'">next</option>
                <option value="layui-icon-prev" layui-icon="layui-icon-prev" th:selected="${menu.icon}=='layui-icon-prev'">prev</option>
                <option value="layui-icon-upload-drag" layui-icon="layui-icon-upload-drag" th:selected="${menu.icon}=='layui-icon-upload-drag'">upload-drag</option>
                <option value="layui-icon-upload" layui-icon="layui-icon-upload" th:selected="${menu.icon}=='layui-icon-upload'">upload</option>
                <option value="layui-icon-download-circle" layui-icon="layui-icon-download-circle" th:selected="${menu.icon}=='layui-icon-download-circle'">download-circle</option>
                <option value="layui-icon-component" layui-icon="layui-icon-component" th:selected="${menu.icon}=='layui-icon-component'">component</option>
                <option value="layui-icon-file-b" layui-icon="layui-icon-file-b" th:selected="${menu.icon}=='layui-icon-file-b'">file-b</option>
                <option value="layui-icon-user" layui-icon="layui-icon-user" th:selected="${menu.icon}=='layui-icon-user'">user</option>
                <option value="layui-icon-find-fill" layui-icon="layui-icon-find-fill" th:selected="${menu.icon}=='layui-icon-find-fill'">find-fill</option>
                <option value="layui-icon-loading" layui-icon="layui-icon-loading" th:selected="${menu.icon}=='layui-icon-loading'">loading</option>
                <option value="layui-icon-loading-1" layui-icon="layui-icon-loading-1" th:selected="${menu.icon}=='layui-icon-loading-1'">loading-1</option>
                <option value="layui-icon-add-1" layui-icon="layui-icon-add-1" th:selected="${menu.icon}=='layui-icon-add-1'">add-1</option>
                <option value="layui-icon-play" layui-icon="layui-icon-play" th:selected="${menu.icon}=='layui-icon-play'">play</option>
                <option value="layui-icon-pause" layui-icon="layui-icon-pause" th:selected="${menu.icon}=='layui-icon-pause'">pause</option>
                <option value="layui-icon-headset" layui-icon="layui-icon-headset" th:selected="${menu.icon}=='layui-icon-headset'">headset</option>
                <option value="layui-icon-video" layui-icon="layui-icon-video" th:selected="${menu.icon}=='layui-icon-video'">video</option>
                <option value="layui-icon-voice" layui-icon="layui-icon-voice" th:selected="${menu.icon}=='layui-icon-voice'">voice</option>
                <option value="layui-icon-speaker" layui-icon="layui-icon-speaker" th:selected="${menu.icon}=='layui-icon-speaker'">speaker</option>
                <option value="layui-icon-fonts-del" layui-icon="layui-icon-fonts-del" th:selected="${menu.icon}=='layui-icon-fonts-del'">fonts-del</option>
                <option value="layui-icon-fonts-code" layui-icon="layui-icon-fonts-code" th:selected="${menu.icon}=='layui-icon-fonts-code'">fonts-code</option>
                <option value="layui-icon-fonts-html" layui-icon="layui-icon-fonts-html" th:selected="${menu.icon}=='layui-icon-fonts-html'">fonts-html</option>
                <option value="layui-icon-fonts-strong" layui-icon="layui-icon-fonts-strong" th:selected="${menu.icon}=='layui-icon-fonts-strong'">fonts-strong</option>
                <option value="layui-icon-unlink" layui-icon="layui-icon-unlink" th:selected="${menu.icon}=='layui-icon-unlink'">unlink</option>
                <option value="layui-icon-picture" layui-icon="layui-icon-picture" th:selected="${menu.icon}=='layui-icon-picture'">picture</option>
                <option value="layui-icon-link" layui-icon="layui-icon-link" th:selected="${menu.icon}=='layui-icon-link'">link</option>
                <option value="layui-icon-face-smile-b" layui-icon="layui-icon-face-smile-b" th:selected="${menu.icon}=='layui-icon-face-smile-b'">face-smile-b</option>
                <option value="layui-icon-align-left" layui-icon="layui-icon-align-left" th:selected="${menu.icon}=='layui-icon-align-left'">align-left</option>
                <option value="layui-icon-align-right" layui-icon="layui-icon-align-right" th:selected="${menu.icon}=='layui-icon-align-right'">align-right</option>
                <option value="layui-icon-align-center" layui-icon="layui-icon-align-center" th:selected="${menu.icon}=='layui-icon-align-center'">align-center</option>
                <option value="layui-icon-fonts-u" layui-icon="layui-icon-fonts-u" th:selected="${menu.icon}=='layui-icon-fonts-u'">fonts-u</option>
                <option value="layui-icon-fonts-i" layui-icon="layui-icon-fonts-i" th:selected="${menu.icon}=='layui-icon-fonts-i'">fonts-i</option>
                <option value="layui-icon-tabs" layui-icon="layui-icon-tabs" th:selected="${menu.icon}=='layui-icon-tabs'">tabs</option>
                <option value="layui-icon-radio" layui-icon="layui-icon-radio" th:selected="${menu.icon}=='layui-icon-radio'">radio</option>
                <option value="layui-icon-circle" layui-icon="layui-icon-circle" th:selected="${menu.icon}=='layui-icon-circle'">circle</option>
                <option value="layui-icon-edit" layui-icon="layui-icon-edit" th:selected="${menu.icon}=='layui-icon-edit'">edit</option>
                <option value="layui-icon-share" layui-icon="layui-icon-share" th:selected="${menu.icon}=='layui-icon-share'">share</option>
                <option value="layui-icon-delete" layui-icon="layui-icon-delete" th:selected="${menu.icon}=='layui-icon-delete'">delete</option>
                <option value="layui-icon-form" layui-icon="layui-icon-form" th:selected="${menu.icon}=='layui-icon-form'">form</option>
                <option value="layui-icon-cellphone-fine" layui-icon="layui-icon-cellphone-fine" th:selected="${menu.icon}=='layui-icon-cellphone-fine'">cellphone-fine</option>
                <option value="layui-icon-dialogue" layui-icon="layui-icon-dialogue" th:selected="${menu.icon}=='layui-icon-dialogue'">dialogue</option>
                <option value="layui-icon-fonts-clear" layui-icon="layui-icon-fonts-clear" th:selected="${menu.icon}=='layui-icon-fonts-clear'">fonts-clear</option>
                <option value="layui-icon-layer" layui-icon="layui-icon-layer" th:selected="${menu.icon}=='layui-icon-layer'">layer</option>
                <option value="layui-icon-date" layui-icon="layui-icon-date" th:selected="${menu.icon}=='layui-icon-date'">date</option>
                <option value="layui-icon-water" layui-icon="layui-icon-water" th:selected="${menu.icon}=='layui-icon-water'">water</option>
                <option value="layui-icon-code-circle" layui-icon="layui-icon-code-circle" th:selected="${menu.icon}=='layui-icon-code-circle'">code-circle</option>
                <option value="layui-icon-carousel" layui-icon="layui-icon-carousel" th:selected="${menu.icon}=='layui-icon-carousel'">carousel</option>
                <option value="layui-icon-prev-circle" layui-icon="layui-icon-prev-circle" th:selected="${menu.icon}=='layui-icon-prev-circle'">prev-circle</option>
                <option value="layui-icon-layouts" layui-icon="layui-icon-layouts" th:selected="${menu.icon}=='layui-icon-layouts'">layouts</option>
                <option value="layui-icon-util" layui-icon="layui-icon-util" th:selected="${menu.icon}=='layui-icon-util'">util</option>
                <option value="layui-icon-templeate-1" layui-icon="layui-icon-templeate-1" th:selected="${menu.icon}=='layui-icon-templeate-1'">templeate-1</option>
                <option value="layui-icon-upload-circle" layui-icon="layui-icon-upload-circle" th:selected="${menu.icon}=='layui-icon-upload-circle'">upload-circle</option>
                <option value="layui-icon-tree" layui-icon="layui-icon-tree" th:selected="${menu.icon}=='layui-icon-tree'">tree</option>
                <option value="layui-icon-table" layui-icon="layui-icon-table" th:selected="${menu.icon}=='layui-icon-table'">table</option>
                <option value="layui-icon-chart" layui-icon="layui-icon-chart" th:selected="${menu.icon}=='layui-icon-chart'">chart</option>
                <option value="layui-icon-chart-screen" layui-icon="layui-icon-chart-screen" th:selected="${menu.icon}=='layui-icon-chart-screen'">chart-screen</option>
                <option value="layui-icon-engine" layui-icon="layui-icon-engine" th:selected="${menu.icon}=='layui-icon-engine'">engine</option>
                <option value="layui-icon-triangle-d" layui-icon="layui-icon-triangle-d" th:selected="${menu.icon}=='layui-icon-triangle-d'">triangle-d</option>
                <option value="layui-icon-triangle-r" layui-icon="layui-icon-triangle-r" th:selected="${menu.icon}=='layui-icon-triangle-r'">triangle-r</option>
                <option value="layui-icon-file" layui-icon="layui-icon-file" th:selected="${menu.icon}=='layui-icon-file'">file</option>
                <option value="layui-icon-set-sm" layui-icon="layui-icon-set-sm" th:selected="${menu.icon}=='layui-icon-set-sm'">set-sm</option>
                <option value="layui-icon-reduce-circle" layui-icon="layui-icon-reduce-circle" th:selected="${menu.icon}=='layui-icon-reduce-circle'">reduce-circle</option>
                <option value="layui-icon-add-circle" layui-icon="layui-icon-add-circle" th:selected="${menu.icon}=='layui-icon-add-circle'">add-circle</option>
                <option value="layui-icon-404" layui-icon="layui-icon-404" th:selected="${menu.icon}=='layui-icon-404'">404</option>
                <option value="layui-icon-about" layui-icon="layui-icon-about" th:selected="${menu.icon}=='layui-icon-about'">about</option>
                <option value="layui-icon-up" layui-icon="layui-icon-up" th:selected="${menu.icon}=='layui-icon-up'">up</option>
                <option value="layui-icon-down" layui-icon="layui-icon-down" th:selected="${menu.icon}=='layui-icon-down'">down</option>
                <option value="layui-icon-left" layui-icon="layui-icon-left" th:selected="${menu.icon}=='layui-icon-left'">left</option>
                <option value="layui-icon-right" layui-icon="layui-icon-right" th:selected="${menu.icon}=='layui-icon-right'">right</option>
                <option value="layui-icon-circle-dot" layui-icon="layui-icon-circle-dot" th:selected="${menu.icon}=='layui-icon-circle-dot'">circle-dot</option>
                <option value="layui-icon-search" layui-icon="layui-icon-search" th:selected="${menu.icon}=='layui-icon-search'">search</option>
                <option value="layui-icon-set-fill" layui-icon="layui-icon-set-fill" th:selected="${menu.icon}=='layui-icon-set-fill'">set-fill</option>
                <option value="layui-icon-group" layui-icon="layui-icon-group" th:selected="${menu.icon}=='layui-icon-group'">group</option>
                <option value="layui-icon-friends" layui-icon="layui-icon-friends" th:selected="${menu.icon}=='layui-icon-friends'">friends</option>
                <option value="layui-icon-reply-fill" layui-icon="layui-icon-reply-fill" th:selected="${menu.icon}=='layui-icon-reply-fill'">reply-fill</option>
                <option value="layui-icon-menu-fill" layui-icon="layui-icon-menu-fill" th:selected="${menu.icon}=='layui-icon-menu-fill'">menu-fill</option>
                <option value="layui-icon-log" layui-icon="layui-icon-log" th:selected="${menu.icon}=='layui-icon-log'">log</option>
                <option value="layui-icon-picture-fine" layui-icon="layui-icon-picture-fine" th:selected="${menu.icon}=='layui-icon-picture-fine'">picture-fine</option>
                <option value="layui-icon-face-smile-fine" layui-icon="layui-icon-face-smile-fine" th:selected="${menu.icon}=='layui-icon-face-smile-fine'">face-smile-fine</option>
                <option value="layui-icon-list" layui-icon="layui-icon-list" th:selected="${menu.icon}=='layui-icon-list'">list</option>
                <option value="layui-icon-release" layui-icon="layui-icon-release" th:selected="${menu.icon}=='layui-icon-release'">release</option>
                <option value="layui-icon-ok" layui-icon="layui-icon-ok" th:selected="${menu.icon}=='layui-icon-ok'">ok</option>
                <option value="layui-icon-help" layui-icon="layui-icon-help" th:selected="${menu.icon}=='layui-icon-help'">help</option>
                <option value="layui-icon-chat" layui-icon="layui-icon-chat" th:selected="${menu.icon}=='layui-icon-chat'">chat</option>
                <option value="layui-icon-top" layui-icon="layui-icon-top" th:selected="${menu.icon}=='layui-icon-top'">top</option>
                <option value="layui-icon-star" layui-icon="layui-icon-star" th:selected="${menu.icon}=='layui-icon-star'">star</option>
                <option value="layui-icon-star-fill" layui-icon="layui-icon-star-fill" th:selected="${menu.icon}=='layui-icon-star-fill'">star-fill</option>
                <option value="layui-icon-close-fill" layui-icon="layui-icon-close-fill" th:selected="${menu.icon}=='layui-icon-close-fill'">close-fill</option>
                <option value="layui-icon-close" layui-icon="layui-icon-close" th:selected="${menu.icon}=='layui-icon-close'">close</option>
                <option value="layui-icon-ok-circle" layui-icon="layui-icon-ok-circle" th:selected="${menu.icon}=='layui-icon-ok-circle'">ok-circle</option>
                <option value="layui-icon-add-circle-fine" layui-icon="layui-icon-add-circle-fine" th:selected="${menu.icon}=='layui-icon-add-circle-fine'">add-circle-fine</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">顺序</label>
        <div class="layui-input-inline">
            <input th:value="${menu.index}" type="text" name="index" lay-verify="required" placeholder="请输入顺序"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">类别</label>
        <div class="layui-input-inline">
            <input th:value="${menu.category}" type="text" name="category" lay-verify="required" placeholder="请输入类别"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">地址</label>
        <div class="layui-input-inline">
            <input th:value="${menu.url}" type="text" name="url" lay-verify="required" placeholder="请输入地址"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-hide">
        <input th:value="${menu.id}" type="hidden" name="id">
        <input th:value="${menu.privilegeId}" type="hidden" name="privilegeId">
        <input type="button" lay-submit lay-filter="LAY-menu-front-submit" id="LAY-menu-front-submit" value="确认">
    </div>
</div>

<script src="../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload','treeSelect'], function () {
        var $ = layui.$
            , form = layui.form
            , upload = layui.upload;

        upload.render({
            elem: '#layuiadmin-upload-menuadmin'
            , url: layui.setter.base + 'json/upload/demo.js'
            , accept: 'images'
            , method: 'get'
            , acceptMime: 'image/*'
            , done: function (res) {
                $(this.item).prev("div").children("input").val(res.data.src)
            }
        });

        var treeSelect= layui.treeSelect;
        treeSelect.render({
            // 选择器
            elem: '#tree',
            // 数据
            data: '/privilege/list',
            // 异步加载方式：get/post，默认get
            type: 'get',
            // 占位符
            placeholder: '修改默认提示信息',
            // 是否开启搜索功能：true/false，默认false
            search: true,
            // 点击回调
            click: function(treeObj,treeNode){
                document.querySelector('input[name=privilegeId]').value=treeNode.id;
            },
            preload:function(result){
                if (result.code == 0 && result.data.total > 0) {
                    {
                        result.data.list.forEach(f=>delete f.url);
                        return result.data.list;
                    }
                }
              return [];
            },
            treeOptions: {
                data: {
                    simpleData: {//简单数据模式
                        enable: true,
                        idKey: "id",
                        pIdKey: "dependentId",
                        rootPId: null
                    }
                }
            },
            // 加载完成后的回调函数
            success: function (treeObj,input) {
                var privilegeId = document.querySelector('input[name=privilegeId]').value;
                var node = treeObj.getNodeByParam("id", privilegeId);
                if (node != null) {
                    treeObj.selectNode(node, true);//指定选中ID的节点
                    input.value = node.name;
                }
            }
        });

    })


</script>
</body>
</html>